<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>易买网</title>
    <link rel="stylesheet" type="text/css" href="./css/style.css">
</head>

<body>
<!--头部-->
<jsp:include page="commons/header.jsp" />

<div id="position" class="wrap">
    <!-- 文字的导航 -->
    您现在的位置:<a href="/index">首页</a>&nbsp;&gt;<a href="/search">商品列表</a>&nbsp;&gt;商品详情
</div>

<div id="main" class="wrap">
    <!--左侧分类-->
    <jsp:include page="commons/left.jsp" />

    <div id="product" class="main">
        <h1>${product.name}</h1>
        <div class="infos">
            <div class="thumb">
                <img class="img" src="${product.proPic}">
            </div>
            <div class="buy">
                <br>
                <p>
                    商城价：<span class="price">￥${product.price}</span>
                </p>
                <p>库 存：${product.stock}</p>
                <br>
                <div class="button">
                    <input type="button" onclick="addToCart(${product.id})" <c:if test="${product.stock <=0 }" >disabled="true"</c:if> />
<%--                    <a href="javascript:addShoppingCart(product.id)">放入购物车</a>--%>
                </div>
            </div>
            <div class="clear"></div>
        </div>
        <div class="introduce">
            <h2>
                <strong>商品详情</strong>
            </h2>
            <div class="text">
                ${product.description}
            </div>
        </div>
    </div>

    <div class="clear"></div>
</div>


<!--底部-->
<jsp:include page="commons/footer.jsp" />

</body>
</html>